//创建一个路由器并暴露出去
//1.引入createRouter、组件
import {createRouter,createWebHistory} from "vue-router";
//引入组件
import Home from "@/components/Home.vue";
import About from "@/components/About.vue";

//2.创建路由器
const router=createRouter({
    history:createWebHistory(),   //路由器工作模式
    routes:[//路由规则
        {
            path:'/home',
            component:Home
        },
        {
            path:'/about',
            component:About
        }
    ]
})

//暴露出去router
export default router